package com.sxz.sbs.util;

import android.content.Context;
import android.widget.TextView;

import com.sxz.sbs.R;

/**
 * Created by hp on 2018/1/16.
 * 判断星星个数
 */

public class CommonStarNumber {

    public void setState(Context context,String strStar,int intStar, TextView textView){
        if (strStar.equals("")) {
            if (intStar == 0) {
                textView.setText("");
            } else if (intStar == 1) {
                textView.setText("意向度1");
            } else if (intStar == 2) {
                textView.setText("意向度2");
            } else if (intStar == 3) {
                textView.setText("意向度3");
            } else if (intStar == 4) {
                textView.setText("意向度4");
            } else if (intStar == 5) {
                textView.setText("意向度5");
            }
        }else {
            if (strStar.equals("0")) {
                textView.setText("");
            } else if (strStar.equals("1")) {
                textView.setText("意向度1");
            } else if (strStar.equals("2")) {
                textView.setText("意向度2");
            } else if (strStar.equals("3")) {
                textView.setText("意向度3");
            } else if (strStar.equals("4")) {
                textView.setText("意向度4");
            } else if (strStar.equals("5")) {
                textView.setText("意向度5");
            }
        }

    }
}
